package JUC.多线程;

import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveTask;

/**
 * @author CKC
 * @DateTime 2021/6/12 14:06
 */
public class TestForkJoin {
    public static void main(String[] args) {
        ForkJoinPool pool = new ForkJoinPool(4);
        System.out.println(pool.invoke(new MyTask(5)));
    }
}

class MyTask extends RecursiveTask<Integer> {
    private int n;
    
    public MyTask(int n) {
        this.n = n;
    }
    
    @Override
    protected Integer compute() {
        return null;
    }
}